From: Keir Fraser Date: Tue, 6 May 2008 15:20:24 +0000 (+0100) Subject: x86 hvm: Support interrupt delivery for PIT channel 0 when in modes 3 and 4. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~64 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=df4d2e7b701450197d35aa851463e1329b20981c;p=xen.git x86 hvm: Support interrupt delivery for PIT channel 0 when in modes 3 and 4. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c index 493b7317b9..c41783feb0 100644 --- a/xen/arch/x86/hvm/i8254.c +++ b/xen/arch/x86/hvm/i8254.c @@ -206,19 +206,21 @@ static void pit_load_count(PITState *pit, int channel, int val) switch ( s->mode ) { - case 2: - /* Periodic timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, - &pit->count_load_time[channel]); - break; - case 1: - /* One-shot timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, - &pit->count_load_time[channel]); - break; - default: - destroy_periodic_time(&pit->pt0); - break; + case 2: + case 3: + /* Periodic timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, + &pit->count_load_time[channel]); + break; + case 1: + case 4: + /* One-shot timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, + &pit->count_load_time[channel]); + break; + default: + destroy_periodic_time(&pit->pt0); + break; } }